import request from '@/utils/request'

/**
 * 获取轮播图列表
 * @param params
 * @returns
 */
export function getBannerList(params: Record<string, any>) {
    return request.get('alcohol/banner', {params})
}

/**
 * 轮播图添加
 * @param data
 * @returns
 */
export function addBannerApi(data: Record<string, any>) {
    return request.post('alcohol/banner', data)
}

/**
 * 轮播图编辑
 * @param id
 * @param data
 * @returns
 */
export function editBannerApi(id: number, data: Record<string, any>) {
    return request.put(`alcohol/banner/${id}`, data)
}

/**
 * 轮播图删除
 * @param id
 * @returns
 */
export function deleteBannerApi(id: Record<string, any>) {
    return request.delete(`alcohol/banner/${id}`)
}

/**
 * 获取酒体分类列表
 * @param params
 * @returns
 */
export function getTypeList(params?: Record<string, any>) {
    return request.get('alcohol/type', {params})
}

/**
 * 酒体分类添加
 * @param data
 * @returns
 */
export function addTypeApi(data: Record<string, any>) {
    return request.post('alcohol/type', data)
}

/**
 * 酒体分类编辑
 * @param id
 * @param data
 * @returns
 */
export function editTypeApi(id: number, data: Record<string, any>) {
    return request.put(`alcohol/type/${id}`, data)
}

/**
 * 酒体分类删除
 * @param id
 * @returns
 * */
export function deleteTypeApi(id: Record<string, any>) {
    return request.delete(`alcohol/type/${id}`)
}

/**
 * 酒体列表
 * @param params
 * @returns
 */
export function getBodyList(params?: Record<string, any>) {
    return request.get('alcohol/body', {params})
}

/**
 * 酒体添加
 * @param data
 * @returns
 */
export function addBodyApi(data: Record<string, any>) {
    return request.post('alcohol/body', data)
}

/**
 * 酒体编辑
 * @param data
 * @returns
 */
export function editBodyApi(id: number, data: Record<string, any>) {
    return request.put(`alcohol/body/${id}`, data)
}

/**
 * 酒体删除
 * @param id
 * @returns
 * */
export function deleteBodyApi(id: Record<string, any>) {
    return request.delete(`alcohol/body/${id}`)
}

/**
 * 获取专家列表
 * @param params
 * @returns
 */
export function getBartenderList(params?: Record<string, any>) {
    return request.get('alcohol/bartender', {params})
}

/**
 * 添加专家
 * @param data
 * @returns
 */
export function addBartenderApi(data: Record<string, any>) {
    return request.post('alcohol/bartender', data)
}

/**
 * 编辑专家
 * @param data
 * @returns
 */
export function editBartenderApi(id: number, data: Record<string, any>) {
    return request.put(`alcohol/bartender/${id}`, data)
}

/**
 * 删除专家
 * @param id
 * @returns
 */
export function deleteBartenderApi(id: Record<string, any>) {
    return request.delete(`alcohol/bartender/${id}`)
}

/**
 * 获取其它配置
 * @param params
 * @returns
 * */
export function getOtherConfig(params?: Record<string, any>) {
    return request.get('alcohol/other', {params})
}

/**
 * 保存其它配置
 * @param data
 * @returns
 */
export function saveOtherConfig(data: Record<string, any>) {
    return request.put('alcohol/other', data)
}